package com.pdh.bean;

import java.sql.Timestamp;

/**
 * @Author: 彭德华
 * @Date 2021-08-29 22:19
 */
public class User {
    private int id;
    private String username;
    private String userPhone;
    private String password;
    private int status;
    private String userIdCardNo;
    private Timestamp loginTime;
    //数据库中使用varbinary(16)存储，在查询时，使用inet6_ntoa(login_ip)获取String类型的ip
    private String loginIp;
    private boolean isCourier;
    private Timestamp createTime;
    private Timestamp updateTime;

    public User(int id, String username, String userPhone, String password, int status, String userIdCardNo, Timestamp loginTime, String loginIp, boolean isCourier, Timestamp createTime, Timestamp updateTime) {
        this.id = id;
        this.username = username;
        this.userPhone = userPhone;
        this.password = password;
        this.status = status;
        this.userIdCardNo = userIdCardNo;
        this.loginTime = loginTime;
        this.loginIp = loginIp;
        this.isCourier = isCourier;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }
    //id, userName, passWord, userPhone, idCardNumber


    public User(int id, String username, String userPhone, String password, String userIdCardNo) {
        this.id = id;
        this.username = username;
        this.userPhone = userPhone;
        this.password = password;
        this.userIdCardNo = userIdCardNo;
    }

    public User(int id, String username, String userPhone, String password, Timestamp createTime) {
        this.id = id;
        this.username = username;
        this.userPhone = userPhone;
        this.password = password;
        this.createTime = createTime;
    }

    public User(String username, String userPhone, String password, String userIdCardNo) {
        this.username = username;
        this.userPhone = userPhone;
        this.password = password;
        this.userIdCardNo = userIdCardNo;
    }

    public User() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getUserIdCardNo() {
        return userIdCardNo;
    }

    public void setUserIdCardNo(String userIdCardNo) {
        this.userIdCardNo = userIdCardNo;
    }

    public Timestamp getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(Timestamp loginTime) {
        this.loginTime = loginTime;
    }

    public String getLoginIp() {
        return loginIp;
    }

    public void setLoginIp(String loginIp) {
        this.loginIp = loginIp;
    }

    public boolean isCourier() {
        return isCourier;
    }

    public void setCourier(boolean courier) {
        isCourier = courier;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }
}
